import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 待办事项
 */
@Entity('todo_info')
export class TodoEntity extends BaseEntity {
    @Column({ comment: '待办事项名称' })
    name: string;

    @Column({ comment: '待办事项描述', type: 'text', nullable: true })
    description: string;

    @Index()
    @Column({ comment: '所属项目ID' })
    projectId: number;

    @Index()
    @Column({ comment: '创建者ID' })
    createUserId: number;

    @Index()
    @Column({ comment: '执行者ID' })
    execUserId: number;

    @Column({ comment: '总时长(分钟)', default: 0 })
    totalTime: number;

    @Column({ comment: '待办事项状态', default: 0, dict: ['未开始', '进行中', '已完成'] })
    status: number;
} 